{% extends "base.html" %}

{% block content %}
    <div id="root">
        <div class="app-body-main">
            <div class="app-main-box">
                {% include "_app_header.html" with class="manager-header home-header-transparent-white" %}

                <div class="ant-spin-nested-loading">
                    <div class="ant-spin-container">
                        <div class="edit-developer-info">
                            <div class="main-layout">
                                <div class="title">
                                    <div class="title-message">修改 应用</div>
                                    <a href="{% url 'management_homepage' %}"><span> 返回</span></a></div>
                                <div class="app-create-form">
                                    <div>
                                        <form autocomplete="off" method="post" class="ant-form ant-form-horizontal" action="{% url 'management_update' application.id %}">
                                            {% csrf_token %}

                                            {% for field in form %}
                                                <div class="control-group ">
                                                    <label class="control-label" for="{{ field.id_for_label }}"></label>
                                                    <div class="controls">
                                                        {% for error in field.errors %}
                                                            <span class="help-inline">{{ error }}</span>
                                                        {% endfor %}
                                                    </div>
                                                </div>

                                                <div class="ant-row ant-form-item {% if field.errors %}error{% endif %}">
                                                    <div class="ant-col-6 ant-form-item-label">
                                                        <label for="name" class="ant-form-item-required">{{ field.label }}</label>
                                                    </div>
                                                    <div class="ant-col-12 ant-form-item-control-wrapper">
                                                        <div class="ant-form-item-control">{{ field }}</div>
                                                    </div>
                                                </div>

                                            {% endfor %}
                                            <div class="ant-row ant-form-item"
                                                 style="text-align: center; margin-top: 0px;">
                                                <div class="ant-form-item-control-wrapper">
                                                    <div class="ant-form-item-control"><span
                                                            class="ant-form-item-children"><button type="submit"
                                                                                                   class="ant-btn create-button app-new-xm-btn-normal"><span>保 存</span></button></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
{% endblock %}

{% block footerjs %}
<script type="text/javascript">
    // 给所有 input 添加 class = 'ant-input'
    $("input, textarea").each(function () {
        $(this).addClass('ant-input');
    });
</script>
{% endblock %}